package com.itboye.mybatis.enumtype;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 数据记录的枚举值
 * Created by hebidu on 16/7/20.
 */
@JsonSerialize(using = DataStatusSerializer.class)
public enum DataStatus {
    DELETE("已删除",-1),
    NORMAL("正常",1),
    DISABLED("禁用",0),
    WAIT_CHECK("待审核",2);

    private int status;
    private String desc;

    DataStatus(String desc,int status){
        this.status = status;
        this.desc = desc;
    }

    public String getDesc(){
        return desc;
    }

    public int getStatus() {
        return status;
    }

    @Override
    public String toString() {
        return "DataStatus{" +
                "status=" + status +
                "desc=" + desc +
                '}';
    }
}
